package com.ruoyi.hazard.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.Date;

@Data
@EqualsAndHashCode(callSuper = false)
@TableName("hazard_alarm_record")
@ApiModel(value="HazardAlarmRecord对象", description="隐患弹框记录")
public class HazardAlarmRecord implements Serializable {

    private static final long serialVersionUID = 1L;
    @Excel(name = "序号", type = Excel.Type.ALL, cellType = Excel.ColumnType.NUMERIC, prompt = "序号")
    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    @Excel(name = "通知类型" ,width = 15 )
    @ApiModelProperty(value = "类型:逾期、即将到期")
    @TableField("type")
    private String type;
    @Excel(name="通知状态",width = 10 ,readConverterExp = "false=未读,true=已读",cellType=Excel.ColumnType.BOOLEAN)
    @ApiModelProperty(value = "是否已读")
    @TableField("handled")
    private Boolean handled=false;
    @ApiModelProperty(value = "隐患ID集合")
    @Excel(name = "隐患序号" ,width = 15)
    @TableField("hazard_ids")
    private String hazardIds;
    @Excel(name = "通知时间", width = 15, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建时间")
    private Date receiveTime;
    @Excel(name = "已读时间", width = 15, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "记录最后一次已读时间")
    @TableField("last_handle_time")
    private Date lastHandleTime;

    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty(value = "创建人")
    private String receiveBy;
    @ApiModelProperty(value = "请求参数ID")
    @TableField("delta_from")
    private Long deltaFrom;
    @ApiModelProperty(value = "响应参数ID")
    @TableField("delta_to")
    private Long deltaTo;
    @ApiModelProperty(value = "记录已读时间")
    @TableField("handle_time")
    private Date handleTime;
}
